from types import *


# jobs dictionary
jobs = {

    IntType: lambda x, y: x**2 + y,
    StringType: lambda x, y: y.join(x.split()),
    ListType: lambda x, y: [min(x), max(x), min(y), max(y)]
}

# function
def something(x, y):
    return jobs[type(x)](x, y)

print something(4,5)
print something("Oh my god", "...")
print something([1,2,3], [4,5,6])
